package xwbank.jmeter5.scripts.http;

import org.apache.http.NameValuePair;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.message.BasicNameValuePair;

import java.util.ArrayList;
import java.util.List;

public class PostTest {
    //创建默认的httpClient实例
    static CloseableHttpClient httpClient = HttpClients.createDefault();

    public static void main(String[] args) {
        //创建Post对象
        HttpPost httpPost = new HttpPost("http://localhost:8080/warnWeathers/save");
        //创建参数队列
        List<NameValuePair> params = new ArrayList<NameValuePair>();
        params.add(new BasicNameValuePair("winfo","红色暴雨"));
        params.add(new BasicNameValuePair("wtype", "降雨预警"));
        UrlEncodedFormEntity urlEntity;
    }
}
